<div class="row">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li>
				<a href="#" onclick="toHome()">
					主页
				</a>
			</li>
			<li>
				<a href="#" class="toList" onclick="toMoviePreference()">
					电影特惠列表 
				</a>
			</li>
			<li class="active">
				添加电影特惠
			</li>
		</ol>
	</div>
</div>
<form role="form" class="form-horizontal">
	<div class="row page-cont">
		<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 cont-top">
			<div class="panel panel-white">
				<div class="panel-heading">
					<h4 class="panel-title">
						<span class="title-text">电影特惠录入</span>
					</h4>
					<div class="panel-tools">
						<div class="dropdown">
							<a data-toggle="dropdown" class="btn btn-xs dropdown-toggle btn-transparent-grey">
								<i class="fa fa-cog"></i>
							</a>
							<ul class="dropdown-menu dropdown-light pull-right" role="menu">
								<li>
									<a class="panel-collapse collapses" href="#"><i class="fa fa-angle-up"></i> <span>折叠</span> </a>
								</li>
								<li>
									<a class="panel-expand" href="#">
										<i class="fa fa-expand"></i> <span>全屏</span>
									</a>
								</li>
							</ul>
						</div>
						<a class="btn btn-xs btn-link panel-close" href="#">
							<i class="fa fa-times"></i>
						</a>
					</div>
				</div>
				<div class="panel-body">
					<div class="form-group panel-cont">
					    <label class="col-sm-2 control-label">广告图片</label>
					    <div class="col-sm-5">
					    	<div class="uploadImg">
					    		<div>选择文件</div>
					    		<input type="file" class="form-control" id="topImg" />
					    	</div>
					    </div>
					    <span class="col-sm-4 tips">
					    	<i class="fa fa-info-circle"></i>
					    	类型为 gif,jpg,jpeg,bmp,png
					    </span>
				  	</div>
					<div class="form-group panel-cont">
					    <label class="col-sm-2 control-label">图片预览</label>
					    <div class="col-sm-5 imgShow">
					      
					    </div>
				  	</div>				  	
					<div class="form-group panel-cont">
					    <label for="coupon" class="col-sm-2 control-label">广告名称</label>
					    <div class="col-sm-5">
					      	<input type="text" class="form-control" id="adverName" />
					    </div>
				  	</div>
					<div class="form-group panel-cont">
					    <label class="col-sm-2 control-label">活动价格</label>
					    <div class="col-sm-5">
					      <input type="text" class="form-control" id="price" />
					    </div>
						<span class="col-sm-4 tips">
					    	<i class="fa fa-info-circle"></i>
					    	请输入数字
					    </span>					    
				  	</div>
				  	<div class="form-group panel-cont">
					    <label for="startDate" class="col-sm-2 control-label">活动涉及人数是否限制</label>
					    <div class="col-sm-5 selectDate">
					   		<input type='checkbox' class='isShow' id='isLimitNum' />
					    </div>
						<span class="col-sm-4 tips">
					    	<i class="fa fa-info-circle"></i>
					    	若选定，活动涉及人数将做限制
					    </span>
				  	</div>
				  	<div class="form-group panel-cont hide-text">
					    <label for="endDate" class="col-sm-2 control-label">活动涉及人数</label>
					    <div class="col-sm-5 selectDate">
					    	<input type='text' class='form-control' id='limitNum' />
					    </div>
				  	</div>
					<div class="form-group panel-cont">
					    <label for="endDate" class="col-sm-2 control-label">活动适用范围类型</label>
					    <div class="col-sm-5 selectDate">
					    	<select name="">
					    		<option value="">请选择类型</option>
					    		<option value="">场次</option>
					    		<option value="">电影</option>
					    		<option value="">影院</option>
					    	</select>
					    </div>
						<span class="col-sm-4 tips">
					    	<i class="fa fa-info-circle"></i>
					    	请选择活动的适用范围，必填
					    </span>					    
				  	</div>					
				  	<div class="form-group">
				  		<div class="col-sm-2 col-sm-offset-3">
				  			<button type="button" class="btn btn-danger">提交&nbsp;<i class="fa fa-arrow-circle-right"></i></button>
				  		</div>
				  	</div>
				</div>
			</div>
		</div>
	</div>
</form>
<script>
	// 上传图片
	addUploadImg();


	// getDate($("#startDate"));
	// getDate($("#endDate"));
	
	// 信息验证
	// function checkMsg(){
	// 	if($("#couponName").val() == ""){
	// 		alert("优惠券名称不能为空");
	// 		$("#couponName").focus();
	// 		return false;
	// 	}else if($("#startDate").val() == ""){
	// 		alert("请选择开始时间");
	// 		$("#startDate").focus();
	// 		return false;
	// 	}else if($("#endDate").val() == ""){
	// 		alert("请选择结束时间");
	// 		$("#endDate").focus();
	// 		return false;
	// 	}else{
	// 		return true;
	// 	}
	// }

	// checked是否被选中
	$(".isShow").on("click",function(){
		var index = $(".isShow").index(this);
		if($(this).is(':checked') == true){
			$(".hide-text").eq(index).show();
		}else{
			$(".hide-text").eq(index).hide();
		}
	});

	// 查询
	function queryCoupon(){
		// if(checkMsg()){
		// 	alert("1");
		// }
	}
</script>
